package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ComplaintSuggestMapper;
import com.ruoyi.system.domain.ComplaintSuggest;
import com.ruoyi.system.service.IComplaintSuggestService;

/**
 * 投诉建议 Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-01-03
 */
@Service
public class ComplaintSuggestServiceImpl implements IComplaintSuggestService 
{
    @Autowired
    private ComplaintSuggestMapper complaintSuggestMapper;

    /**
     * 查询投诉建议 
     * 
     * @param complaintSuggestId 投诉建议 主键
     * @return 投诉建议 
     */
    @Override
    public ComplaintSuggest selectComplaintSuggestByComplaintSuggestId(Long complaintSuggestId)
    {
        return complaintSuggestMapper.selectComplaintSuggestByComplaintSuggestId(complaintSuggestId);
    }

    /**
     * 查询投诉建议 列表
     * 
     * @param complaintSuggest 投诉建议 
     * @return 投诉建议 
     */
    @Override
    public List<ComplaintSuggest> selectComplaintSuggestList(ComplaintSuggest complaintSuggest)
    {
        return complaintSuggestMapper.selectComplaintSuggestList(complaintSuggest);
    }

    /**
     * 新增投诉建议 
     * 
     * @param complaintSuggest 投诉建议 
     * @return 结果
     */
    @Override
    public int insertComplaintSuggest(ComplaintSuggest complaintSuggest)
    {
        complaintSuggest.setCreateTime(DateUtils.getNowDate());
        return complaintSuggestMapper.insertComplaintSuggest(complaintSuggest);
    }

    /**
     * 修改投诉建议 
     * 
     * @param complaintSuggest 投诉建议 
     * @return 结果
     */
    @Override
    public int updateComplaintSuggest(ComplaintSuggest complaintSuggest)
    {
        complaintSuggest.setUpdateTime(DateUtils.getNowDate());
        return complaintSuggestMapper.updateComplaintSuggest(complaintSuggest);
    }

    /**
     * 批量删除投诉建议 
     * 
     * @param complaintSuggestIds 需要删除的投诉建议 主键
     * @return 结果
     */
    @Override
    public int deleteComplaintSuggestByComplaintSuggestIds(Long[] complaintSuggestIds)
    {
        return complaintSuggestMapper.deleteComplaintSuggestByComplaintSuggestIds(complaintSuggestIds);
    }

    /**
     * 删除投诉建议 信息
     * 
     * @param complaintSuggestId 投诉建议 主键
     * @return 结果
     */
    @Override
    public int deleteComplaintSuggestByComplaintSuggestId(Long complaintSuggestId)
    {
        return complaintSuggestMapper.deleteComplaintSuggestByComplaintSuggestId(complaintSuggestId);
    }
}
